﻿using Harmontronics.Model.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Harmontronics.Model.Entitys
{
    /// <summary>
    /// 用户
    /// </summary>
    [Table("users")]
    public class Users
    {
        /// <summary>
        /// 主键
        /// </summary>
        /// 
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Key]
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [Column("employeeNumber" )]
        public string EmployeeNumber { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [NotNull]
        [Column("userName" )]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [NotNull]
        [Column("password" )]
        public string Password { get; set; }
          

        /// <summary>
        /// 手机号
        /// </summary>
        [Column("phoneNumber" )]
        public string PhoneNumber { get; set; }
          
        /// <summary>
        /// 头像路径
        /// </summary>
        [Column("headPortrait" )]
        public string? HeadPortrait { get; set; }
       
        /// <summary>
        /// 是否启用（0=未启用，1=启用）
        /// </summary>
        [Column("enable")]
        public int Enable { get; set; }
         

        /// <summary>
        /// 创建人Id
        /// </summary>
        [Column("createBy" )]
        [MaybeNull]
        public string CreateBy { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        [Column("createTime")]
        [MaybeNull]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 修改人Id
        /// </summary>
        [Column("updateBy" )]
        [MaybeNull]
        public string UpdateBy { get; set; }
        /// <summary>
        /// 修改日期
        /// </summary>
        [Column("updateTime")]
        [MaybeNull]
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("isDeleted")]
        [MaybeNull]
        public int IsDeleted { get; set; }
    }
}
